package feng.demo.dao;

import feng.demo.entity.Cart;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface CartDao {
    List<Cart> findAll();
    List<Cart> findAllLimit(@Param("pagenum") Integer pagenum, @Param("lines")Integer lines);
    List<Cart> findCart(Map<String,Object>map);
    List<Cart> findByUid(Integer uid);
    Cart findByComid(Integer comid);
    int add(Cart cart);
    int del(Integer cartid);
    int delUidComid(@Param("uid") Integer uid, @Param("comid")Integer comid);
    int update(Cart cart);
    Cart findById(Integer cartid);
    int findCount();
}
